Problem Note 54843: PROC EXPAND might not honor the OBSERVED= option if it is specified in the PROC statement
If the OBSERVED= option is specified in the PROC EXPAND statement and no CONVERT statement is included in the PROC EXPAND step, then the following occurs:
- The specified OBSERVED=value is ignored, and
- The default OBSERVED=BEGINNING attribute is applied to all numeric variables on the DATA= data set
This can cause the results returned by the procedure to be different than expected, because the observation characteristics of the data specified in the OBSERVED= option are not used.
For example, suppose you have a data set, A, with a large number of variables that represent quarterly averages, and you want to convert the values of all these numeric variables to monthly averages. If you specify:
proc expand data=a out=b from=qtr to=month observed=average;
id date;
run;
then the returned results are incorrect, because the OBSERVED=AVERAGE attribute is not honored and all input and output observations are treated as beginning-of-period values.
To circumvent the problem, add a CONVERT statement to the PROC EXPAND step and either list the variable names to be processed by the procedure or use the _NUMERIC_ keyword. The above example code can be modified as follows so that the OBSERVED=AVERAGE attribute is honored:
proc expand data=a out=b from=qtr to=month observed=average;
id date;
convert _numeric_;
run;
Operating System and Release Information
SAS System | SAS/ETS | z/OS | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows XP 64-bit Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft® Windows® for x64 | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
Microsoft Windows Server 2003 Datacenter Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2003 for x64 | 9.21 | | 9.2 TS2M0 | |
Microsoft Windows Server 2008 R2 | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 for x64 | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
Microsoft Windows XP Professional | 9.21 | | 9.2 TS2M0 | |
Windows Vista | 9.21 | | 9.2 TS2M0 | |
Windows Vista for x64 | 9.21 | | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
64-bit Enabled HP-UX | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
64-bit Enabled Solaris | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
HP-UX IPF | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
Linux | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
Linux for x64 | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
OpenVMS on HP Integrity | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
Solaris for x64 | 9.21 | 14.1 | 9.2 TS2M0 | 9.4 TS1M3 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Topic: | Analytics ==> Econometrics Analytics ==> Financial Analysis Analytics ==> Forecasting Analytics ==> Time Series Analysis SAS Reference ==> Procedures ==> EXPAND
|
Date Modified: | 2017-08-08 16:00:37 |
Date Created: | 2014-12-12 15:04:17 |